#ifndef MACHANICAL_ARM_TASK_H
#define MACHANICAL_ARM_TASK_H

#include "struct_typedef.h"
#include "CAN_receive.h"
#include "pid.h"
#include "remote_control.h"

#define MACHANICAL_ARM_TASK_INIT_TIME 201
#define MACHANICAL_ARM_CONTROL_TIME 2

typedef enum
{
		MECHANICAL_ARM_MOTOR_RAW = 0,
		
} mechanical_arm_motor_mode_e;

typedef struct
{
		const motor_measure_t *mechanical_arm_motor_measure;
		fp32 accel;
		fp32 speed;
		fp32 speed_set;
		int16_t give_current;
} mechanical_arm_motor_t;

typedef struct
{
    const RC_ctrl_t *gimbal_rc_ctrl;
	
		Joint_Motor_t joint_motor[3];
		
		mechanical_arm_motor_t mechanical_arm_j3_motor;//j4???????
    mechanical_arm_motor_t mechanical_arm_j4_motor;//j5???????
		mechanical_arm_motor_t mechanical_arm_j5_motor;//j5???????
	
} mechanical_arm_control_t;

extern mechanical_arm_control_t mechanical_arm_control;

extern const mechanical_arm_motor_t *get_yaw_motor_point(void);
extern const mechanical_arm_motor_t *get_j4_motor_point(void);
extern const mechanical_arm_motor_t *get_j5_motor_point(void);
extern const mechanical_arm_motor_t *get_j6_motor_point(void);
extern void mechanical_arm_task(void const *pvParameters);

#endif
